﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using cSharpStudents415.Data.Models;

namespace cSharpStudents415.Data
{
    public static class Seeder
    {
        public static void Seed(StudentsDbContext db)
        {
            db.Courses.AddOrUpdate(
             c => c.CourseId,
            new Course() { CourseId = 100, CourseName = "English", InstructorName = "Mrs. Nezbit", RoomNumber = 304 },
            new Course() { CourseId = 101, CourseName = "History", InstructorName = "Mr. Smith", RoomNumber = 601 }
        );
            db.Alumni.AddOrUpdate(
               s => s.Name,
               new Alumni() { Name = "Julio", AlumniId = 1, Level = GradeLevel.FRESHMEN, GradeAverage = 0.2, EmailAddress = "dogluvr101@aol.com", Horoscope = "Sagitarius", CourseId = 101 },
               new Alumni() { Name = "Andrew", AlumniId = 2, Level = GradeLevel.SOPHOMORE, GradeAverage = 1.01, EmailAddress = "evilgenius@yahoo.com", Horoscope = "Taurus", CourseId = 100 },
               new Alumni() { Name = "Bill", AlumniId = 3, Level = GradeLevel.SENIOR, GradeAverage = 3.1, EmailAddress = "buffalobill100@gmail.com", Horoscope = "Libra", CourseId = 100 }
               );

           // context.People.AddOrUpdate(
            //      p => p.FullName,
            //      new Person { FullName = "Andrew Peters" },
            //      new Person { FullName = "Brice Lambson" },
            //      new Person { FullName = "Rowan Miller" }
            //    );
        }
    }
}
